package com.qdu.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.qdu.entity.Structure;

public interface StructureMapper {
	
	Structure getStructureById(int strid);
	
	List<Structure> getStructureByCoursePlan(int cpid);
	
	List<Structure> getStructureByClassroom(int classrmid);
	
	List<Structure> getStructureByCoursePlanAndCycle(@Param("cpid") int cpid, @Param("cycle") int cycle);

	List<Structure> getStructureByClassroomAndCycle(@Param("classrmid") int classrmid, @Param("cycle") int cycle);
	
	List<Structure> getAllStructure();
	
	boolean addStructure(@Param("structure") Structure structure,
						 @Param("cpid") int cpid,
						 @Param("classrmid") int classrmid);

	boolean modifyStructure(@Param("structure") Structure structure,
			 				@Param("cpid") int cpid,
			 				@Param("classrmid") int classrmid);

	boolean deleteStructureById(int strid);
}
